<?php

/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4 fdm=marker: */

/**
 * LightBot_IListener
 *
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://framework.zend.com/license/new-bsd
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@zend.com so we can send you a copy immediately.
 *
 * @category  LightBot
 * @package   LightBot
 * @copyright Copyright (c) 2008 Olivier Hoareau <hoareau.olivier@gmail.com>
 * @author    Olivier Hoareau <hoareau.olivier@gmail.com>
 * @license   License http://framework.zend.com/license   New BSD License
 * @version   $Id:$
 */

require_once dirname(__FILE__) . '/ILightBot.php';

// {{{ LightBot_IListener

/**
 * Event listener interface
 *
 * @category  LightBot
 * @package   LightBot
 * @copyright Copyright (c) 2008 Olivier Hoareau <hoareau.olivier@gmail.com>
 * @author    Olivier Hoareau <hoareau.olivier@gmail.com>
 * @license   License http://framework.zend.com/license   New BSD License
 */
interface LightBot_IListener
{
    // {{{ setLightBot()

    /**
     * Sets the light bot
     *
     * @param  LightBot_ILightBot $lightBot the light bot
     * @return LightBot_IListener $this
     */
    public function setLightBot(LightBot_ILightBot $lightBot);

    // }}}
    // {{{ getLightBot()

    /**
     * Returns the light bot
     *
     * @return LightBot_ILightBot the light bot
     */
    public function getLightBot();

    // }}}
    // {{{ messageReceived()

    /**
     * Notifies that a message has been received
     *
     * @param  array    $msg the message event
     */
    public function messageReceived($message);

    // }}}
    // {{{ presenceReceived()

    /**
     * Notifies that a presence has been received
     *
     * @param  array    $presence the presence event
     */
    public function presenceReceived($presence);

    // }}}
    // {{{ subscriptionRequestReceived()

    /**
     * Notifies that a subscription request has been received
     *
     * @param  array    $subscription the subscription event
     */
    public function subscriptionRequestReceived($subscription);

    // }}}
    // {{{ subscriptionConfirmationReceived()

    /**
     * Notifies that a subscription confirmation has been received
     *
     * @param  array    $subscription the subscription event
     */
    public function subscriptionConfirmationReceived($subscription);

    // }}}
    // {{{ unsubscriptionRequestReceived()

    /**
     * Notifies that a unsubscription request has been received
     *
     * @param  array    $unsubscription the subscription event
     */
    public function unsubscriptionRequestReceived($unsubscription);

    // }}}
    // {{{ unsubscriptionConfirmationReceived()

    /**
     * Notifies that a subscription request has been received
     *
     * @param  array    $subscription the subscription event
     */
    public function unsubscriptionConfirmationReceived($subscription);

    // }}}
    // {{{ composingReceived()

    /**
     * Notifies that a composing event has been received
     *
     * @param  array    $composing the composing event
     */
    public function composingReceived($composing);

    // }}}
    // {{{ errorReceived()

    /**
     * Notifies that an error event has been received
     *
     * @param  array    $error the error event
     */
    public function errorReceived($error);

    // }}}
    // {{{ contactsUpdated()

    /**
     * Notifies that a contact list update has been received
     *
     * @param  array    $contactsUpdate the contacts list update event
     */
    public function contactsUpdated($contactsUpdate);

    // }}}
    // {{{ connected()

    /**
     * Notifies that a new socket connection to jabber server is opened
     *
     * @param  array    $event the connect event
     */
    public function connected($event);

    // }}}
    // {{{ disconnected()

    /**
     * Notifies that a socket has been closed
     *
     * @param  array    $event the disconnect event
     */
    public function disconnected($event);

    // }}}
    // {{{ loggedIn()

    /**
     * Notifies of a bot login
     *
     * @param  array    $event the login event
     */
    public function loggedIn($event);

    // }}}
    // {{{ loggedOut()

    /**
     * Notifies of a bot logout
     *
     * @param  array    $event the logout event
     */
    public function loggedOut($event);

    // }}}
}   

// }}}

/*
 * Local variables:
 * tab-width: 4
 * c-basic-offset: 4
 * c-hanging-comment-ender-p: nil
 * End:
 */
